﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using QLHXNK.DataAccess;

namespace QLHXNK.BusinessLogic
{
  public  class Import_Note_Detail
    {
        #region Properties
      int import_note_detail_id;
        int import_note_id; int item_id; Double quantity; Double fob_usd; Double fob_eur; Double cif_usd; Double cif_eur; Double kr_fee; Double hk_fee; Double ita_fee; Double tl_fee; Double other_country_fee; Double ut_fee; Double vat_fee; Double tax_fee; Double other_fee; Double net1; Double net2; Double selling_price; Double profit1; Double profit2;
        private int myVar;
      public int ImportNoteDetailID
      {
          get { return import_note_detail_id; }
          set { import_note_detail_id = value; }
      }

        public int ImportNoteID
        {
            get { return import_note_id; }
            set { import_note_id = value; }
        }
	public int ItemID
        {
            get { return item_id; }
            set { item_id = value; }
        }

        public Double Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        }
        public Double FOB_USD
        {
            get { return fob_usd; }
            set { fob_usd = value; }
        }

        public Double FOB_EUR
        {
            get { return fob_eur; }
            set { fob_eur = value; }
        }
        public Double CIF_USD
        {
            get { return cif_usd; }
            set { cif_usd = value; }
        }


        public Double CIF_EUR
        {
            get { return cif_eur; }
            set { cif_eur = value; }
        }

        public Double KR_FEE
        {
            get { return kr_fee; }
            set { kr_fee = value; }
        }
        public Double HK_FEE
        {
            get { return hk_fee; }
            set { hk_fee = value; }
        }

        public Double ITA_FEE
        {
            get { return ita_fee; }
            set { ita_fee = value; }
        }

        public Double TL_FEE
        {
            get { return tl_fee; }
            set { tl_fee = value; }
        }

        public Double OtherCountryFee
        {
            get { return other_country_fee; }
            set { other_country_fee = value; }
        }
        public Double UT_FEE
        {
            get { return ut_fee; }
            set { ut_fee = value; }
        }

        public Double VAT_FEE
        {
            get { return vat_fee; }
            set { vat_fee = value; }
        }

        public Double TAX_FEE
        {
            get { return tax_fee; }
            set { tax_fee = value; }
        }

        public Double OtherFee
        {
            get { return other_fee; }
            set { other_fee = value; }
        }
        public Double NET1
        {
            get { return net1; }
            set { net1 = value; }
        }
        public Double NET2
        {
            get { return net2; }
            set { net2 = value; }
        }

        public Double SellingPrice
        {
            get { return selling_price; }
            set { selling_price = value; }
        }
        public Double Profit1
        {
            get { return profit1; }
            set { profit1 = value; }
        }
        public Double Profit2
        {
            get { return profit2; }
            set { profit2 = value; }
        }
        #endregion
        #region --------------------------------------------Thêm, Xoá, Sửa-----------------------------------------
        //Thêm://///////////////Tính toán chi phí
        public static int Insert(int import_note_id, int item_id, String quantity, String fob_usd, String fob_eur, String cif_usd, String cif_eur, String kr_fee, String hk_fee, String ita_fee, String tl_fee, String other_country_fee, String ut_fee, String vat_fee, String tax_fee, String other_fee, String net1, String net2, String selling_price, String profit1, String profit2)
        {
            return Import_Note_DetailData.Insert(import_note_id, item_id, quantity, fob_usd, fob_eur, cif_usd, cif_eur, kr_fee, hk_fee, ita_fee, tl_fee, other_country_fee, ut_fee, vat_fee, tax_fee, other_fee, net1, net2, selling_price, profit1, profit2);
        }

        //Xóa://////////////////////////////
        public static int Delete(int ID)
        {
            return Import_Note_DetailData.Delete(ID);
        }

        public static int Delete_In_Import_Note(int Import_Note_ID)
        {
            return Import_Note_DetailData.Delete_In_Import_Note(Import_Note_ID);
        }

        //Sửa:///////////////////Tính toán chi phí
        public static int Update(int ID, int import_note_id, int item_id, String quantity, String fob_usd, String fob_eur, String cif_usd, String cif_eur, String kr_fee, String hk_fee, String ita_fee, String tl_fee, String other_country_fee, String ut_fee, String vat_fee, String tax_fee, String other_fee, String net1, String net2, String selling_price, String profit1, String profit2)
        {
            return Import_Note_DetailData.Update(ID, import_note_id, item_id, quantity, fob_usd, fob_eur, cif_usd, cif_eur, kr_fee, hk_fee, ita_fee, tl_fee, other_country_fee, ut_fee, vat_fee, tax_fee, other_fee, net1, net2, selling_price, profit1, profit2);
        }
        #endregion

        #region -----------------------------------------Lấy danh sách----------------------------------
        public static DataTable getImport_Note_DetailList(String strSQL)
        {
            return Import_Note_DetailData.getImport_Note_DetailList(strSQL);
        }
        #endregion
    }
}
